package com.zimin.cloud.wiki.api;

import com.zimin.cloud.mine.pojo.wiki.business.EbookBO;
import com.zimin.shared.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

/**
 * @author zimin
 */
@FeignClient(name = IBaseWikiFeign.SERVER_NAME)
public interface IEbookFeign {

    /**
     * 获取电子书列表
     *
     * @param ebookBO 请求参数
     */
    @GetMapping(value = "/wiki/ebooks")
    Result ebookList(@SpringQueryMap EbookBO ebookBO);


    /**
     * <p>保存电子书</p>
     *
     * @param ebookBO 保存参数
     * @return com.zimin.cloud.shared.pojo.Result
     * @author zimin
     * @since 2021-11-02 18:01:48
     */
    @PostMapping(value = "/wiki/ebook")
    Result saveEbook(@RequestBody EbookBO ebookBO);

    /**
     * <p>修改电子书</p>
     *
     * @param ebookBO 修改电子书参数
     * @return com.zimin.cloud.shared.pojo.Result
     * @author zimin
     * @since 2021-11-02 18:02:03
     */
    @PutMapping(value = "/wiki/ebook")
    Result updateEbook(@RequestBody EbookBO ebookBO);

    /**
     * <p>根据ID删除电子书</p>
     *
     * @param id 要删除的id
     * @return com.zimin.cloud.shared.pojo.Result
     * @author zimin
     * @since 2021-11-02 18:02:21
     */
    @DeleteMapping("/wiki/ebook/{id}")
    Result removeEbookById(@PathVariable(value = "id") String id);
}
